The goal is to solve the original classic minesweeper (use Minesweeper Arbiter here) with highest win rate. 目标是以最高胜率解决原版经典扫雷游戏(此处使用 Minesweeper Arbiter)。
This solver uses matrix to analysis all unsolved cells. 该求解器使用矩阵来分析所有未解的单元格。 It uses linear least square (scipy.optimize.lsq_linear) to find the probability of each unsolved cell. 它采用线性最小二乘法(scipy.optimize.lsq_linear)来计算每个未解单元格的雷的概率。 So that if a guess is required, the solver can click the cell with lowest probability. 因此,在需要猜测时,求解器会点击概率最低的单元格。 Current win rate is around 23%. If ignore the situation failing before any open cells, win rate is around 27%. 当前胜率约为23%。如果忽略在任何单元格打开前就失败的情况,胜率约为27%。
1. This solver clicks cells in the corners first. 1. 该求解器首先点击角落的单元格。 It is not guaranteed the best start. 这不一定是最佳的起始选择。 2. If need to guess, the solver will click the one with lowest probability to have a mine. 2. 当需要猜测时,求解器会点击雷的概率最低的单元格。 This is not guaranteed best choice because two 50% guess is worse than one 33% guess. 这不一定是最佳选择,因为两个50%的猜测不如一个33%的猜测。
Source Code / 源代码 Capture.PNG in Source Code / 源代码中的截图 Capture.PNG